import {createRouter, createWebHistory} from 'vue-router'

const router=createRouter({
    history:createWebHistory(),
    routes:[
        {
            path:"/my",component:()=>import("../views/My.vue")
        },
        {
            path:"/contact",component:()=>import("../views/Contact.vue")
        },
        {
            //this.$route.params.id
            path:"/chat/:id",component:()=>import("../views/Chat.vue"),
            // props:true,//自动把id 注入 props 在组件内部 props:["id"]
        }
    ]
});
export default router;